package com.hqyj.service.impl;

import com.hqyj.pojo.ApplicationStatus;
import com.hqyj.dao.ApplicationStatusMapper;
import com.hqyj.service.IApplicationStatusService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author rock
 * @since 2021-10-25
 */
@Service
public class ApplicationStatusServiceImpl extends ServiceImpl<ApplicationStatusMapper, ApplicationStatus> implements IApplicationStatusService {
    //注入mapper
    @Autowired(required = false)
    ApplicationStatusMapper applicationStatusMapper;
    @Override
    public HashMap<String, Object> add(ApplicationStatus a) {
        HashMap<String, Object> map = new HashMap<String, Object>();
        //新增
        int num = applicationStatusMapper.insertStatus(a);
        if(num>0){
            map.put("info","保存成功");
        }else{
            map.put("info","保存错误");
        }
        return map;
    }
}
